package com.wanxi.treeset;

import java.util.Comparator;
import java.util.Set;
import java.util.TreeSet;

public class ScoreSort {
    public static void main(String[] args) {
        Set<StudentSore> set = new TreeSet<>(new Comparator<StudentSore>() {
            @Override
            public int compare(StudentSore o1, StudentSore o2) {
                return o2.getYuwen() + o2.getShuxue() + o2.getYingyu() - (o1.getYuwen() + o1.getShuxue() + o1.getYingyu());

            }
        });

    }
}
